package es.unileon.prg2.patterns.handler;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class LongNameTests {

	private LongName name1;
	private LongName name2;
	private LongName name3;
	
	@Before
	public void setUp() throws Exception {
		name1 = new LongName("name1");
		name2 = new LongName(new LongName("name2"));
		name3 = new LongName("name2");
	}

	@Test
	public void testLongNameToString() {
		assertEquals(name1.toString(), "name1");
	}
	
	public void testLongNameCompareToNotOk() {
		assertEquals(name1.compareTo(name2), -1);
	}
	
	public void testLongNameCompareToOk() {
		assertEquals(name2.compareTo(name3), 0);
	}

}
